package org.feiye.studyday27.fanshe;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Hashtable;

public class Fanshe {
	public static void main(String[] args) {

		Class h = Hashtable.class;
		System.out.println("Hashtable的父类和接口如下：");
		System.out.println(h.getSuperclass());
		Class[] interfaces = h.getInterfaces();
		for (Class class1 : interfaces) {
			System.out.println(class1);
		}
		System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>");

		System.out.println("Hashtable的构造方法如下：");
		Constructor[] c = h.getDeclaredConstructors();
		for (Constructor cc : c) {
			System.out.println(cc);
		}
		System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>");

		System.out.println("Hashtable的属性如下：");
		Field[] f = h.getDeclaredFields();
		for (Field ff : f) {
			System.out.println(ff);
		}
		System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>");

		System.out.println("Hashtable的方法如下：");
		Method[] d = h.getDeclaredMethods();
		for (Method mm : d) {
			System.out.println(mm);
		}
//		System.out.println(Arrays.toString(c));
//		System.out.println(Arrays.toString(f));
//		System.out.println(Arrays.toString(d));
	}

}
